package mc.web.decorators;

import java.util.Locale;
import java.util.ResourceBundle;
import mc.domain.Usluga;

import org.displaytag.decorator.TableDecorator;

public class EditDeleteUslugaDecorator extends TableDecorator {
	
	private Locale loc = new Locale("pl","PL");
	private ResourceBundle res = ResourceBundle.getBundle("messages", loc);
	
	public String getLink1(){
		
	 Usluga obj = (Usluga)getCurrentRowObject();
	 int oid= obj.getId();
	 StringBuffer html = new StringBuffer();
	 
	 html.append("<input type='submit' name='edit,");
	 html.append(oid);
	 html.append("'value='"+res.getString("decorator.edytuj")+"'/>");
	 html.append("&nbsp;|&nbsp;");
	 html.append("<input type='submit' name='del,");
	 html.append(oid);
	 html.append("'value='");
	 html.append(res.getString("decorator.usun")+"'");
	 html.append("onclick=\"return confirm('"+res.getString("decorator.czynapewno")+"')\">");

	 
	 return html.toString();
	
	}

}

